<?php

namespace App\Models\Order;

use App\Models\Common\Media;
use App\Models\System\CheckItem;
use Dcat\Admin\Traits\HasDateTimeFormatter;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
use Illuminate\Database\Eloquent\SoftDeletes;

class GoodsOrderCheckItem extends Model
{
	use HasDateTimeFormatter;
    use SoftDeletes;

    protected $table = 'goods_order_check_items';

    protected $guarded = [];

    public function checkItem() : BelongsTo
    {
        return $this->belongsTo(CheckItem::class, 'check_item_id');
    }

    public function thumb() : BelongsTo
    {
        return $this->belongsTo(Media::class, 'thumb_id');
    }
}
